<template>
    <div>
        <template v-for="item in this.menuTree">
            <el-submenu v-if="item.children" :index="item.url" :key="item.id">
                <template slot="title">
                    <i :class="item.icon"/>
                    <span slot="title">{{item.name}}</span>
                </template>
                <vip-menu :menuList="item.children"/>
            </el-submenu>
            <el-menu-item v-else :index="item.url" :key="item.id">
                <i :class="item.icon"/>
                <span>{{item.name}}</span>
            </el-menu-item>
        </template>
    </div>
</template>

<script>
    export default {
        name: "VipMenu",
        props:['menuTree']
    }
</script>

<style scoped>

</style>
